<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    /*    function add(a,b) {
            return a + b;
        }

        var result = add(1,2);

        alert(result);*/

    var add = function (a, b) {
        return a + b;
    }
    var result = add(1,2);

    alert(result);


</script>

</body>
</html>